/**
 * 
 */
package org.t2.game.server.module.difchannel;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.t2.game.server.foundation.starting.ApplicationSettings;
import org.t2.game.server.module.recharge.model.RechargeOrder;

import pb.t2.protobuf.player.Player.PlayerLoginRequest;

/**
 * 
 */
@Component
public class DifChannelManager {

	@Autowired
	private ApplicationSettings applicationSettings;
	
	public void onLogin(PlayerLoginRequest request) {
		String code = applicationSettings.getGameChannelCode();
		DifChannelService difChannelService = DifChannelService.getService(code);
		difChannelService.onLogin(request);
	}
	
	public void onRecharge(RechargeOrder rechargeOrder) {
		String code = applicationSettings.getGameChannelCode();
		DifChannelService difChannelService = DifChannelService.getService(code);
		difChannelService.onRecharge(rechargeOrder);
	}
}
